﻿@using Utils
@model LuxDiner.Model.Orders.PaidOrderModel
@{
    ViewBag.Title = "Print";
    Layout = null;
}

<link href="@Url.Content("/content/styles/print_order.css")" type="text/css" rel="stylesheet" />

<div class="print">
    <table>
        <tr>
            <td class="main">
                <div class="top">
                    <b>鼎宴食品
                    (@LuxDiner.Web.Management.Common.GetOrderName(Model.Method))
                    </b>
                </div>
                <div class="banner">
                    <table>
                        <tr>
                            <td style="width: 50%"><b>客户：</b>@Model.Customer.Corporation (@Model.Customer.Mobile)</td>
                            <td style="width: 25%"><b>单据日期：</b>@Model.NoteDate.ToString("yyyy年MM月dd日")</td>
                            <td style="width: 25%; text-align:right"><b>NO：</b>@Model.OrderNo</td>
                        </tr>
                    </table>
                </div>
                <div class="body">
                    <table>
                        <tr class="title">
                            <td style="width: 70%">往来帐户</td>
                            <td style="width: 30%">金额</td>
                        </tr>
                        @foreach (var item in Model.Items)
                        {
                            <tr>
                                <td>@item.Bank.ShowName</td>
                                <td style="text-align: right">@(string.Format("{0:c2}", item.Money))</td>
                            </tr>
                        }
                        <tr>
                            <td><b>总金额(大写)：</b>¥ @ChineseNum.GetUpperMoney((double)Model.TotalMoney)</td>
                            <td><b>总计：</b>@(string.Format("{0:c2}", Model.TotalMoney))</td>
                        </tr>
                    </table>
                </div>
                <div class="foot">
                    <table>
                        <tr>
                            <td><b>备注：</b>@Model.Description</td>
                        </tr>
                    </table>
                </div>
            </td>
            <td class="side">
                <div>白(存)</div>
                <div>红(客)</div>
                <div>蓝(库)</div>
                <div>黄(记)</div>
            </td>
        </tr>
    </table>
    <div id="bt">
        <input type="button" value="打 印" onclick="Print()" />
    </div>
</div>

<script>
    function Print() {
        var obj = document.getElementById("bt");
        obj.parentNode.removeChild(obj);
        window.print();
    }
</script>

